<template>
  <div>
    <div id="top">
      <div id="topBar">
        <router-link :to="{name:'getPoints'}"><van-icon name="arrow-left" style="float: left;margin-top: 0.5rem;margin-left: 0.5rem"/>
          <p style="float: left">安全常识答题</p></router-link>
      </div>
    </div>
    <div id="content">
    <p id="num">
      {{num}}
    </p>
      <p id="title">
        {{title}}
      </p>
      <van-checkbox-group v-model="result" :max="4">
        <van-checkbox name="a" class="checkBox">复选框 a</van-checkbox>
        <van-checkbox name="b" class="checkBox">复选框 b</van-checkbox>
        <van-checkbox name="c" class="checkBox">复选框 c</van-checkbox>
        <van-checkbox name="d" class="checkBox">复选框 d</van-checkbox>
      </van-checkbox-group>
      <van-button @click="change" type="info" style="width: 100%;height: 2rem; line-height: 2rem;margin-top: 1.5rem">确认</van-button>

    </div>
  </div>
</template>

<script>
    export default {
        name: "questionOfSafety",
       data(){
          return{
            num:1,
            title:"上下楼梯该往哪儿行？",
            result:[],
          }
      },
      methods:{
          change(){
            console.log(this.result)
          }
      }
    }
</script>

<style scoped>
  #top{
    width: 100%;
    height:5rem;
    background: red;
    overflow: hidden;
    position: relative;
  }
  #topBar{
    height: 2rem;
    width: 100%;
    line-height: 2rem;
    background: papayawhip;
    color:black;
    font-size: 1rem;
    margin-top: 1rem;
  }
  #topBar p{
    display: inline-block;
  }
#content{

  height: 100%;
  background: #42b983;
  overflow: hidden;
  padding: 0 3rem;
}
  #num{
    font-size: 1rem;
    text-align: left;
  }
  #title{
    text-align: left;
    margin-top: 1rem;
    font-size: 1rem;
  }
  .checkBox{
    margin-top: 1rem;
    font-size: 0.9rem;
  }
</style>
